package com.cqie.tes.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cqie.tes.comm.R;
import com.cqie.tes.comm.service.impl.BaseServiceImpl;
import com.cqie.tes.domain.Dept;
import com.cqie.tes.domain.SysFunc;
import com.cqie.tes.mapper.SysFuncMapper;
import org.springframework.stereotype.Service;
import com.cqie.tes.service.SysFuncService;

@Service
public class SysFuncServiceImpl extends BaseServiceImpl<SysFuncMapper, SysFunc> implements SysFuncService {
    @Override
    public R edit(SysFunc entity) {
        return super.edit(entity);
    }

    @Override
    public R deleteById(Integer id) {
        if (id == null || id == 0) {
            return R.error().message("记录ID不能为空");
        }
        SysFunc entity = this.getById(id);
        if (entity == null) {
            return R.error().message("记录不存在");
        }
        return super.delete(entity);
    }
}
